{include file="./headStart.tpl"}
{include file="./headEnd.tpl"}
<head>
<link type="text/css" href="css/jquery.toastmessage-min.css" rel="stylesheet"/>
<script type="text/javascript" src="js/jquery-1.5.min.js"></script>
<script type="text/javascript" src="js/jquery.toastmessage-min.js"></script>

<script type="text/javascript">
$(document).ready(function()
{
	if($("#msg").val() == 1)
	{
	  showInsertSuccess();
	}
function showInsertSuccess()
{
  $().toastmessage('showSuccessToast', "Your Message Sent SuccessfullY.");
}

	//getPartyName();
	$("#selectAllCheck").click(function()
	{
	  if($("#selectAllCheck").is(":checked"))
	  {
	  	$("input[id=techCheck]").attr('checked', 'checked');
	  }
	  else
	  {
	  	$("input[id=techCheck]").removeAttr('checked', 'checked');
	  }
	});
  $("#selectAllCheckCust").click(function()
	{
	  if($("#selectAllCheckCust").is(":checked"))
	  {
	  	$("input[id=pTypeCheck]").attr('checked', 'checked');
	  }
	  else
	  {
	  	$("input[id=pTypeCheck]").removeAttr('checked', 'checked');
	  }
	});
});

function getPartyName()
{
	if($("#customer").val() != 0)
	{
		if($("#customer").val() == 1)
		{
	    var dataString = "partyId=" + $("#customer").val();
	  }
	  
	  if($("#customer").val() == 2)
	  {
	    var dataString = "vendorId=" + $("#customer").val();
	  }
	  $.ajax({
	  url: "./smsGetPartyAj.php",
	  cache: false,
	  data: dataString,
	  success:function(data){
	    //$("#partyType1").hide();
	    $("#partyType2").html(data);
	    }
	  });
	}
	else
	{
	  $("#partyType2").html('<p>&nbsp;</p>');	
	}
}
</script>
</head>
<form action="{$smarty.server.PHP_SELF}" name='user' method='POST'>
	
<table border='0' cellpadding='1' cellspacing='2' align='left'>
<tr>
  <td class="table1" align="center" colspan="2"><font style="font-size: 16px"><b> Employee Available </b></font></td>
</tr>
<tr>
  <td  class="table1" align='center' ><input type="checkbox" name="selectAllCheck" id="selectAllCheck" onclick="checkAll();"/></td>
	<td  class="table1" align='center' ><B>Employee Name</td>
</tr>
{section name="sec1" loop=$techArray}
<tr>
  <td class="table3" align="center" id="employee">  
	 <input type="checkbox" name="techCheck[]" id="techCheck" class="techCheck" value="{$techArray[sec1].technicianId}">
	</td>
  <td class="table3" align="left" id="tooltip">{$techArray[sec1].techName}
    <span>Mobile :{$techArray[sec1].mobile1}</span>	
  </td>
</tr>
{/section}
</table>

<table border='0' cellpadding='1' cellspacing='2' align='left'>
<tr>
  <td class="table1" align="center" colspan="2"><font style="font-size: 16px"><b> Customers </b></font></td>
</tr>
<tr>
  <td  class="table1" align='center' ><input type="checkbox" name="selectAllCheckCust" id="selectAllCheckCust" onclick="checkAllCust();" /></td>
	<td  class="table1" align='center' >Select :
		<select id="customer" onchange="getPartyName();">
		  <option value="0">None</option>
		  <!--<option value="1">Customer</option>-->
      <option value="2">Vendor</option>
		</select>
  </td>
</tr>
<!--div style="float:left;" id="partyType1">
{section name="secP" loop=$partyArray}
<tr>
  <td class="table3" align="center">  
	  <input type="checkbox" name="pTypeCheck[]" id="pTypeCheck" class="techCheck" value="{$partyArray[secP].partyId}">
  </td>
  <td class="table3" align="left" style="width:15px;">{$partyArray[secP].companyName}</td>
</tr>
{sectionelse}
{/section}
</div-->
</table>
<span style="position:relative; float:left; top:65px; margin-left:-184px;" id="partyType2"></span>
<table border='0' cellpadding='1' cellspacing='2' align='left'>
<tr>
  <td class="table1" align="center" colspan="2"><font style="font-size: 16px"><b> Message </b></font></td>
</tr>
<tr>
  <td class="table1" align="center"><textarea name="msgText" id="msgText" rows="5" cols="30" style="font-size:18px"></textarea></td>
</tr>
<tr>
  <td class="table1" align="center"><input type="submit" name="techSub" id="techSub" value=" Submit "/></td>
</tr>
<tr>
<input type="hidden" name="msg" id="msg" value="{$msgGet}">	
</tr>

</table>
<table border='0' cellpadding='1' cellspacing='2' align='center'>
<tr>
  <td class="table1" align="center"><font style="font-size: 16px"><b> Additional Numbers </b></font></td>
</tr>
<tr>
  <td class="table1" align="center"><textarea name="numbers" id="numbers" rows="5" cols="30" style="font-size:18px"></textarea></td>
</tr>
</table>
</form>
{include file="footer.tpl"}